<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head th:replace="top::html"/>
<title>专家匹配需求详情</title>
<body class="fixed hold-transition skin-blue">
	<div class="wrapper">

		<div th:replace="tophtml::html"></div>
		<div th:replace="left::html"></div>

		<div class="content-wrapper">
			<section class="content-header">
				<h1>
					专家匹配需求详情<small></small>
				</h1>
				<ol class="breadcrumb">
					<li><a href="/index"><i class="fa fa-dashboard"></i>用户中心</a></li>
					<li><a href="/person/findPersonList">专家管理</a></li>
					<li><a th:href="@{'/person/mateDemandView?pid='+${person.pid}}">专家匹配需求</a></li>
					<li><a th:href="@{/person/findButtDetailsList(pid=${person.pid})}">专家匹配需求详情</a></li>
				</ol>
				<form th:action="@{/person/findButtDetailsList}" method="get" id="from1">
					<input type="hidden" name="pageNo" id="pageNo" th:value="${pageInfo.pageNum}"/>
					<br><br>
					<div class="form-group" style=" font-size: 16px;">
						<label>专家姓名：</label> 
						<a th:href="@{/person/findPersonList(pid=${person.pid})}" th:text="${person.name}"></a><br>
						<label>所属领域：</label>
		                      <span th:text="${person.researchField}"></span><br>
		                      <label>专业领域：</label>
						<span th:title="${person.professionaField}" th:text="${not #strings.isEmpty(person.professionaField)} and ${#strings.length(person.professionaField)} > 100 ? ${#strings.substring(person.professionaField, 0, 100)}+'...' : ${person.professionaField}"></span>
	              	</div>
					<div class="form-group">
						<div class="form-group">
							<label></label> 
							<select class="form-control" name="buttStatus" th:field="${buttDetails.buttStatus}">
								<option value="0">--根据状态筛选--</option>
								<option th:each="psd : ${buttStatus}" th:value="${psd.names}" th:text="${psd.worth}"></option>
							</select>
						</div>
						<!-- 传递给后台是为了只检索专家 -->
						<input type="hidden" name="pid" th:value="${buttDetails.expertNumber}" />
						<button type="submit" class="btn btn-primary">搜索</button>
						<button type="reset" style="margin-left: 40px;" class="btn btn-primary">重置</button>
						<input type="button" class="btn btn-primary" value="返回" onclick="window.history.go(-1)" style="margin-left: 40px;">
					</div>
				</form>
				<div class="box">
					<!-- /.box-header -->
					<div class="box-body">
						<table class="table table-bordered">
							<tbody>
								<tr>
									<th>对接介绍</th>
					                <th>负责人</th>
					                <th>对接时间</th>
					                <th>对接状态</th>
					                <th>对接详情</th>
					                <th>对接附件</th>
					                <th>操作</th>
								</tr>									 <!-- 判断是否包含需求pid -->
								<tr th:each="collect : ${pageInfo.list}" th:with="isUpdated=${#lists.contains(updatedDemandIdList, collect.demandNumber)}">
									<td>
						                <p style="font-weight: normal;" th:text="${collect.expertName}"></p>
						                <!-- 需求名称 -->
						                <p th:text="${not #strings.isEmpty(collect.demandName)} and ${#strings.length(collect.demandName)} > 20 ? ${#strings.substring(collect.demandName, 0, 20)}+'...' : ${collect.demandName}" 
                            			   th:title="${collect.demandName}"></p>
						                <p style="font-weight: normal;" th:text="${collect.projectName}"></p>
						                <p style="font-weight: normal;" th:text="${collect.customerName}"></p>
						                <p style="font-weight: normal;" th:text="${collect.confName}"></p>
						            </td>
						            <td th:text="${collect.buttName}"></td>
						            <td th:text="${collect.buttDataTime}"></td>
					                <td th:if="${collect.buttStatus==1}">沟通对接需求</td>
					               	<td th:if="${collect.buttStatus==2}">已签合作协议</td>
					                <td th:if="${collect.buttStatus==3}">执行对接任务</td>
					                <td th:if="${collect.buttStatus==4}">完成对接需求</td>
					                <!-- 对接详情 -->
                					<td th:text="${not #strings.isEmpty(collect.buttDetails)} and ${#strings.length(collect.buttDetails)} > 20 ? ${#strings.substring(collect.buttDetails, 0, 20)}+'...' : ${collect.buttDetails}" 
                            			th:title="${collect.buttDetails}"></td>
                					<td >
                						<a  th:if="${collect.buttaNnex}" th:href="@{'/person/download?fileName='+${collect.buttaNnex}}">对接附件</a>
                					</td>
               	  					<td>
               	  						<a th:href="@{/person/findHistoryButtDetails(pid=${collect.pid})}">查看历史详情</a>|
               	  						<a th:href="@{/person/addDetailsView(pid=${collect.pid})}">添加对接详情</a>
               	  						<span th:unless="${isUpdated}">|</span>  <!-- 判断是否显示撤销匹配 -->
                                        <a th:unless="${isUpdated}" th:href="@{'/person/deleteDemandButt?pid='+${person.pid}+'&buttId='+${collect.pid}+'&buttSta='+${collect.buttStatus}}">撤销匹配</a>
               	  					</td>
								</tr>
							</tbody>
						</table>
					</div>
					<div th:replace="page::html"></div>
					<!-- 返回按钮 -->
					<div style="width:240px; height: 30px; position:fixed;left:727px;bottom:10px;">
						<a href="/person/findPersonList" class="btn btn-primary">返回主页面</a>
						<button style="margin-left: 30px;" type="button" class="btn btn-primary" onclick="window.history.go(-1)">返回上一级</button>
					</div>
				</div>
			</section>
			<section class="content container-fluid"></section>
		</div>
		
		<div th:replace="footer::html"></div>
		<div class="control-sidebar-bg"></div>
	</div>
	
	<div th:replace="bottom::html"></div>
</body>
</html>